package org.acompanhamento.pages.team;

import java.util.ArrayList;
import java.util.List;

import jmine.tec.web.wicket.pages.form.FormPage;
import jmine.tec.web.wicket.pages.form.FormType;

import org.acompanhamento.HelpMessages;
import org.acompanhamento.domain.Team;
import org.apache.wicket.Component;
import org.apache.wicket.Page;
import org.apache.wicket.request.mapper.parameter.PageParameters;

import bancosys.tec.exception.MessageCreator;
import bancosys.tec.security.annotation.Secure;
import bancosys.tec.security.authorization.UrlPermission;

/**
 * 
 * @author lundberg
 *
 */
@Secure(id = "GENERIC_TEAM_MEMBER_URL", permissionType = UrlPermission.class)
public class EditTeamPage extends FormPage<Team> {

    public EditTeamPage(PageParameters pageParameters) {
        super(pageParameters);
    }
    
    public EditTeamPage(Page sourcePage, PageParameters sourcePageParameters, Team entity, FormType formType) {
        super(sourcePage, sourcePageParameters, entity, formType);
    }

    public EditTeamPage(PageParameters pageParameters, Page sourcePage) {
        super(pageParameters, sourcePage);
    }

	@Override
	protected List<Component> createFormComponents() {
        List<Component> components = new ArrayList<Component>();
        components.add(this.createTextField("name"));
        return components;
	}

	@Override
	protected MessageCreator getHelpTextCreator() {
		return HelpMessages.TEAMS;
	}
}
